package section_11.problem;

import java.io.FileInputStream;
import java.io.ObjectInputStream;
import java.util.List;

public class NeedCasting {
	@SuppressWarnings({ "unchecked", "unused" })
	public void f(String[] args) throws Exception{
		ObjectInputStream in = new ObjectInputStream(new FileInputStream(args[0]));
		List<Widget> shapes = (List<Widget>)in.readObject();
		in.close();
	}
	
	@SuppressWarnings({ "unchecked", "unused" })
	public void f1(String[] args) throws Exception{
		ObjectInputStream in = new ObjectInputStream(new FileInputStream(args[0]));
		List<Widget> lw2 = List.class.cast(in.readObject());
		in.close();
	}
}

class Widget{}